<div class="page-bar">
	<ul class="page-breadcrumb">
		<li><span>管理子系统</span> <i class="fa fa-angle-right"></i></li>
		<li><span>用户管理</span> <i class="fa fa-angle-right"></i></li>
		<li><span>添加用户</span></li>
	</ul>
</div>
<div class="content" id="user_add_content">
	<div class="page_form row">
		<div class="col-sm-12">
			<form class="form-horizontal" id="user_add_form">
				<div class="row form_split_title">
					<h4 class="col-sm-12"><font color="#36c6d3">▎</font> <b>基本信息</b> </h4>
				</div>
				<div class="row">
					<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label"><i>*</i>昵称:</label>
						<div class="col-sm-6">
							<input type="text" name="nickName" class="form-control input-sm" placeholder="昵称"></input>
						</div>
					</div>
					<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label"><i></i>性别:</label>
						<div class="col-sm-6">
							<div>
								<label class="radio-inline"><input checked="checked" name="sex" type="radio" value="1"/>男</label>
								<label class="radio-inline"><input name="sex" type="radio" value="2"/>女</label>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label"><i>*</i>部门:</label>
						<div class="col-sm-6">
							<div id="user_add_dept_combotree" class="input-group" init_value></div>
						</div>
					</div>
					<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label"><i></i>出生日期:</label>
						<div class="col-sm-6">
							<input type="text" id="user_add_birthday" name="birthday" class="form-control input-sm" readonly placeHolder="出生日期">
						</div>
					</div>
				</div>
				<div class="row">
					<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label"><i>*</i>手机:</label>
						<div class="col-sm-6">
							<input type="text" name="mobile" class="form-control input-sm" placeholder="手机"></input>
							<span class="form_tips">提示：一个账号只能绑定一个手机。</span>
						</div>
					</div>
					<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label"><i>*</i>邮箱:</label>
						<div class="col-sm-6">
							<input type="text" name="email" class="form-control input-sm" placeholder="邮箱"></input>
							<span class="form_tips">提示：一个账号只能绑定一个邮箱，默认为未激活。</span>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label"><i>*</i>所在地:</label>
						<div class="col-sm-8 form-inline">
							<div>
								<select id="user_add_province_id" name="provinceId" class="form-control input-sm select_region" init_value></select>
								<select id="user_add_city_id" name="cityId" class="form-control input-sm select_region" init_value></select>
								<select id="user_add_district_id" name="districtId" class="form-control input-sm select_region" init_value></select>
							</div>
							<label class="error_tips">请完善用户地区信息.</label>
						</div>
					</div>
					<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label"><i></i>详细地址:</label>
						<div class="col-sm-6">
							<input type="text" name="address" class="form-control input-sm" placeholder="详细地址"></input>
						</div>
					</div>
				</div>
				
				<div class="row">
					<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label"><i></i>状态:</label>
						<div class="col-sm-6">
							<div>
								<label class="radio-inline"><input checked="checked" name="status" type="radio" value="1"/>启用</label>
								<label class="radio-inline"><input name="status" type="radio" value="0"/>禁用</label>
							</div>
						</div>
					</div>
					<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label"><i>*</i>排序:</label>
						<div class="col-sm-6">
							<input type="number" name="sort" class="form-control input-sm" placeholder="排序"></input>
						</div>
					</div>
				</div>
				
				<div class="row">
					<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label"><i>*</i>角色:</label>
						<div class="col-sm-6">
							<div>
								<label class="checkbox-inline" th:each="role : ${roles}">
									<input name="roleIds" type="checkbox" th:value="${role.id}"/>
									<span th:text="${role.name}"></span>
								</label>
							</div>
							<!-- <label class="error">角色不能为空！</label> -->
						</div>
					</div>
				</div>
				
				<hr class="col-sm-12" />
				<div class="row form_split_title">
					<h4 class="col-sm-12"><font color="#36c6d3">▎</font> <b>资料上传</b> </h4>
				</div>
				<div class="row">
					<!-- http://www.cnblogs.com/leechenxiang/p/6603884.html -->
					<div class="form-group col-sm-6">
						<label class="col-sm-4 control-label"><i></i>头像:</label>
						<div class="col-sm-6">
							<div id="user_add_head_image" init_value></div>
							<span class="form_tips">提示：图片大小不能超过2M</span>
						</div>
					</div>
				</div>
				<hr class="col-sm-12" />
				<div class="row">
					<div class="form-group col-sm-12">
						<div class="form-group" style="margin: 5px;">
							<div class="col-sm-12 text-right">
								<button type="button" class="btn btn-success btn-sm" style="margin-right:10px;" onclick="add_user();">保存</button>
								<button type="button" class="btn btn-success btn-sm" onclick="add_next();">保存并继续添加用户</button>
							</div>
						</div>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
<script type="text/javascript">
	require(["./static/pages/scripts/system/user"], function(user){
		user.initAddDialog();
	});
</script>
</html>